package com.youlai.boot.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.youlai.boot.system.mapper.FinishMapper;
import com.youlai.boot.system.mapper.FonishMapper;
import com.youlai.boot.system.model.QB.Fonish;
import com.youlai.boot.system.service.FonishService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;
@Service
public class FonishServiceImpl extends ServiceImpl<FonishMapper, Fonish> implements FonishService {
    private static final Logger logger = LoggerFactory.getLogger(DeviceServiceImpl.class);
    @Autowired
    private FonishMapper fonishMapper;
    @Override
    public boolean saveFonish(Fonish finish) {

        finish.setAddtime(LocalDateTime.now());
        return save(finish);
    }

    @Override
    public List<Fonish> getAllFonish() {
        return fonishMapper.selectList(null);
    }

    @Override
    public boolean deletFonishById(Integer id) {
        return fonishMapper.deleteById(id) > 0;
    }
}
